package com.example.pagingdemo.model;

import androidx.annotation.NonNull;

import com.google.gson.annotations.SerializedName;

/**
 * @author: tuyrt7 on 2020/9/9.
 */
public class User {

    @SerializedName("account_id")
    public int id;

    @SerializedName("profile_image")
    public String avatar;

    @SerializedName("display_name")
    public String name;

    public User(int id, String avatar, String name) {
        this.id = id;
        this.avatar = avatar;
        this.name = name;
    }


    @Override
    public boolean equals(Object o) {
        if (o == null || !(o instanceof User)) {
            return false;
        }
        User newUser = (User) o;
        return id == newUser.id
                && name.equals(newUser.name)
                && avatar.equals(newUser.avatar);
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", avatar='" + avatar + '\'' +
                ", name='" + name + '\'' +
                '}';
    }
}
